package com.sinaapp.mrblog.game.Assasin.model;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.sinaapp.mrblog.game.Assasin.stage.GameStage;
import com.sinaapp.mrblog.game.Assasin.util.AssasinManager;
import com.sinaapp.mrblog.game.Assasin.util.Director;

public class Bloodstain extends BaseActor{

	public static final int BLOODSTAIN_STATE_DEAD = 0;
	public static final int BLOODSTAIN_STATE_SHOOT =1;
		
	public static final float FLOODSTAIN_WIDTH = 2;
	public static final float FLOODSTAIN_HEIGHT = 2;
	
	public static final float FLOODSTAIN_TOUCH_DST = 1;
	
	
	BaseActor actor;
	
	public Bloodstain(BaseActor actor , int state) {
		super(actor.getCenterX()-FLOODSTAIN_WIDTH/2, actor.getCenterY()-FLOODSTAIN_HEIGHT/2, FLOODSTAIN_WIDTH, FLOODSTAIN_HEIGHT);
		this.actor = actor;
		setState(state);
		angle = actor.angle;
	}
	@Override
	public void act(float delta) {	
		if(bounds.contains(GameStage.killer.getCenterX(),
				GameStage.killer.getCenterY())){
			GameStage.killer.touchFloodTime = Footprint.TOUCH_FLOOD_TIME;
		}
		
		
		
		if(getState() == BLOODSTAIN_STATE_DEAD){
			region = AssasinManager.floodDeathRegion;
		}else if(getState() == BLOODSTAIN_STATE_SHOOT){
			region = AssasinManager.floodShootRegion;
		}
		
		super.act(delta);
	}
	
	@Override
	public void refreshStatus() {
		
	}
	@Override
	public TextureRegion getReadyRegion() {
		return region;
	}
}
